<template>
  <div ref="bar" class="bar" />
</template>

<script>
import echarts from 'echarts'

export default {
  mounted() {
    const myCharts = echarts.init(this.$refs.bar)
    myCharts.setOption({
      xAxis: {
        // 隐藏x轴
        show: false,
        type: 'category'
      },
      yAxis: {
        // 隐藏y轴
        show: false
      },
      // 系列
      series: [
        {
          type: 'bar',
          data: [10, 7, 33, 12, 48, 9, 29, 10, 44, 33, 22, 8],

          color: 'pink'

        }
      ],
      // 布局调试
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0
      },
      tooltip: {}

    })
  }
}
</script>

<style scoped>
.bar{
    width: 100%;
    height: 100%;
}

</style>
